*This file runs the regressions for Table A8

*Table A8, Panel A: Differential Development Impacts Across Land Tenure Regimes, did_multiplegt
*******************************************************************************
*******************************************************************************

*Part i): Fee Simple

preserve
keep if Fee ==1
*Baseline with no rezxt controls
did_multiplegt devpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) ) 
estadd scalar tstat = e(effect_average)/e(se_effect_average)

*off-rez population
did_multiplegt devpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(offrespop) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) )  
estadd scalar tstat = e(effect_average)/e(se_effect_average)

*casinos
did_multiplegt devpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(has_casino) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) )  
estadd scalar tstat = e(effect_average)/e(se_effect_average)

*credit
did_multiplegt devpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(has_credit) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) ) 
estadd scalar tstat = e(effect_average)/e(se_effect_average)

*all rez-t controls
did_multiplegt devpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(offrespop has_casino has_credit) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) scheme(white_hue) ysize(20) xsize(20) xline(-.5) legend(off)) 
estadd scalar tstat = e(effect_average)/e(se_effect_average)

restore


*Part ii): Allotted Trust


preserve
keep if Allotted ==1
*Baseline with no rezxt controls
did_multiplegt devpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) ) 
estadd scalar tstat = e(effect_average)/e(se_effect_average)

*off-rez population
did_multiplegt devpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(offrespop) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) )  
estadd scalar tstat = e(effect_average)/e(se_effect_average)

*casinos
did_multiplegt devpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(has_casino) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) )  
estadd scalar tstat = e(effect_average)/e(se_effect_average)

*credit
did_multiplegt devpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(has_credit) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) ) 
estadd scalar tstat = e(effect_average)/e(se_effect_average)

*all rez-t controls
did_multiplegt devpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(offrespop has_casino has_credit) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) scheme(white_hue) ysize(20) xsize(20) xline(-.5) legend(off)) 
estadd scalar tstat = e(effect_average)/e(se_effect_average)

restore



*Part iii): Tribal Trust

preserve
keep if Tribal ==1
*Baseline with no rezxt controls
did_multiplegt devpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) ) 
estadd scalar tstat = e(effect_average)/e(se_effect_average)

*off-rez population
did_multiplegt devpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(offrespop) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) )  
estadd scalar tstat = e(effect_average)/e(se_effect_average)

*casinos
did_multiplegt devpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(has_casino) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) )  
estadd scalar tstat = e(effect_average)/e(se_effect_average)

*credit
did_multiplegt devpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(has_credit) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) graphregion(color(white))  ysize(15) xtitle(Time to Treatment) xsize(20) yline(0, lpattern(dash) lcolor(gs10)) legend(off) ) 
estadd scalar tstat = e(effect_average)/e(se_effect_average)

*all rez-t controls
did_multiplegt devpct ID	 year post, placebo(2) dynamic(2) trends_nonparam(StateCode) cluster(TOWNSHIP) breps(10) seed(10) controls(offrespop has_casino has_credit) robust_dynamic longdiff_placebo covariances average_effect graphoptions (ytitle(Agriculture (%)) scheme(white_hue) ysize(20) xsize(20) xline(-.5) legend(off)) 
estadd scalar tstat = e(effect_average)/e(se_effect_average)

restore



*Table A8, Panel B: Differential Development Impacts Across Land Tenure Regimes, csdid
*******************************************************************************
*******************************************************************************

*Part i): Fee Simple

preserve
keep if  Fee ==1

eststo clear
*Baseline with no rezxt controls
csdid devpct , ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


*off-rez population
csdid devpct offrespop, ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


*casinos
csdid devpct has_casino, ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


*credit 
csdid devpct has_credit, ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


*all rez-t controls
csdid devpct offrespop has_casino has_credit, ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


restore


*Part ii): Allotted Trust

preserve
keep if Allotted ==1

eststo clear
*Baseline with no rezxt controls
csdid devpct , ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


*off-rez population
csdid devpct offrespop, ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


*casinos
csdid devpct has_casino, ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


*credit
csdid devpct has_credit, ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


*all rez-t controls
csdid devpct offrespop has_casino has_credit, ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


restore



*Part iii): Tribal Trust

preserve
keep if  Tribal ==1

eststo clear
*Baseline with no rezxt controls
csdid devpct , ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


*off-rez population
csdid devpct offrespop, ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple)  drimp


*casinos
csdid devpct has_casino, ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


*credit
csdid devpct has_credit, ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp


*all rez-t controls
csdid devpct offrespop has_casino has_credit, ivar(ID) time(t) gvar(TG)  cluster(TOWNSHIP) agg(simple) drimp



restore

*Table A8, Panel C: Differential Development Impacts Across Land Tenure Regimes, twfe
*******************************************************************************
*******************************************************************************


preserve 
keep if tenure <=3

eststo clear
*Baseline with no rezxt controls
reghdfe devpct post allotted_post tribal_post , absorb(ID stateXyear) cluster(TOWNSHIP)
sum devpct if e(sample) ==1
estadd scalar MDV = r(mean)
lincom  post + allotted_post
estadd scalar adiff = r(estimate)
estadd scalar ase_diff = r(se)
estadd scalar apval = 2*normal(-abs(r(estimate)/r(se)))
lincom  post + tribal_post
estadd scalar tdiff = r(estimate)
estadd scalar tse_diff = r(se)
estadd scalar tpval = 2*normal(-abs(r(estimate)/r(se)))
est sto twfe_dev_tenure_1

*off-rez population
reghdfe devpct post  allotted_post tribal_post offrespop , absorb(ID stateXyear) cluster(TOWNSHIP)
sum devpct if e(sample) ==1
estadd scalar MDV = r(mean)
lincom  post + allotted_post
estadd scalar adiff = r(estimate)
estadd scalar ase_diff = r(se)
estadd scalar apval = 2*normal(-abs(r(estimate)/r(se)))
lincom  post + tribal_post
estadd scalar tdiff = r(estimate)
estadd scalar tse_diff = r(se)
estadd scalar tpval = 2*normal(-abs(r(estimate)/r(se)))
est sto twfe_dev_tenure_2

*casinos
reghdfe devpct post  allotted_post tribal_post has_casino, absorb(ID stateXyear) cluster(TOWNSHIP)
sum devpct if e(sample) ==1
estadd scalar MDV = r(mean)
lincom  post + allotted_post
estadd scalar adiff = r(estimate)
estadd scalar ase_diff = r(se)
estadd scalar apval = 2*normal(-abs(r(estimate)/r(se)))
lincom  post + tribal_post
estadd scalar tdiff = r(estimate)
estadd scalar tse_diff = r(se)
estadd scalar tpval = 2*normal(-abs(r(estimate)/r(se)))
est sto twfe_dev_tenure_3

*credit
reghdfe devpct post  allotted_post tribal_post has_credit, absorb(ID stateXyear) cluster(TOWNSHIP)
sum devpct if e(sample) ==1
estadd scalar MDV = r(mean)
lincom  post + allotted_post
estadd scalar adiff = r(estimate)
estadd scalar ase_diff = r(se)
estadd scalar apval = 2*normal(-abs(r(estimate)/r(se)))
lincom  post + tribal_post
estadd scalar tdiff = r(estimate)
estadd scalar tse_diff = r(se)
estadd scalar tpval = 2*normal(-abs(r(estimate)/r(se)))
est sto twfe_dev_tenure_4

*all rez-t controls
reghdfe devpct post  allotted_post tribal_post offrespop has_casino has_credit, absorb(ID stateXyear) cluster(TOWNSHIP)
sum devpct if e(sample) ==1
estadd scalar MDV = r(mean)
lincom  post + allotted_post
estadd scalar adiff = r(estimate)
estadd scalar ase_diff = r(se)
estadd scalar apval = 2*normal(-abs(r(estimate)/r(se)))
lincom  post + tribal_post
estadd scalar tdiff = r(estimate)
estadd scalar tse_diff = r(se)
estadd scalar tpval = 2*normal(-abs(r(estimate)/r(se)))
est sto twfe_dev_tenure_5


esttab twfe_dev_tenure*,  se(a3) b(a3) star(* 0.1 ** 0.05 *** 0.01) ar2  replace   scalar(N_clust M1 MDV adiff apval tdiff tpval)

restore
